<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'tenant-form',
	'enableAjaxValidation'=>true,
	// 'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

<p class="help-block">Fields with <span class="required">*</span> are required.</p>

<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'tenant_name',array('class'=>'span5','maxlength'=>250)); ?>

	<?php //echo $form->textFieldRow($model,'educational_stage_id',array('class'=>'span5')); ?>

	<?php 
		echo $form->labelEx($model,'educational_stage_id'); 
		echo $form->dropDownList($model, 'educational_stage_id', array('' => '') + CHtml::listData(EducationalStage::model()->findAll(),'id','abbreviation'));
		echo $form->error($model,'educational_stage_id');
	?>

	<?php echo $form->textFieldRow($model,'institutional_name',array('class'=>'span5','maxlength'=>250)); ?>

	<?php echo $form->textFieldRow($model,'address',array('class'=>'span5','maxlength'=>500)); ?>

	<?php echo $form->textFieldRow($model,'telephone_number_1',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'telephone_number_2',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'email',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'fax_number_1',array('class'=>'span5','maxlength'=>20)); ?>

	<?php echo $form->textFieldRow($model,'fax_number_2',array('class'=>'span5','maxlength'=>20)); ?>

	<?php 
		//echo $form->textFieldRow($model,'flag',array('class'=>'span5','maxlength'=>9)); 
		echo $form->labelEx($model,'flag'); 
		echo $form->dropDownList($model, 'flag', array('' => '', 'active' => 'active', 'nonactive' => 'nonactive'));
		echo $form->error($model,'flag');
	?>

	<?php 

		if (!$model->isNewRecord) 
				echo $form->textFieldRow($model,'admin_user',array('class'=>'span5','maxlength'=>50, "disabled"=>"disabled"));
			else		
				echo $form->textFieldRow($model,'admin_user',array('class'=>'span5','maxlength'=>50)); 
		?>

	<?php //echo $form->textFieldRow($model,'registration_date',array('class'=>'span5')); ?>



<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
</div>

<?php $this->endWidget(); ?>
